﻿using umbraco.BusinessLogic;
using uREST.Core.Resources;

namespace uREST.Core.Extensions
{
    public static class UserExtensions
    {
        public static string Tokenize(this User user)
        {
            var token = new Token
            {
                Username = user.LoginName,
                Password = user.Password,
                Type = TokenType.User
            };

            return token.Tokenize(false);
        }
    }
}
